//
//  ViewController.swift
//  MDSplashScreen
//
//  Created by 85940969@qq.com on 01/11/2018.
//  Copyright (c) 2018 85940969@qq.com. All rights reserved.
//

import UIKit
import MDSplashScreen

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        NotificationCenter.default.addObserver(self, selector: #selector(ViewController.toAdVC(notification:)), name: NSNotification.Name.init(ToAdVC), object: nil)
        // Do any additional setup after loading the view, typically from a nib.
    }
    
    @objc func toAdVC(notification:NSNotification){
        let url = notification.object as!String
        let vc = MDAdViewController()
        vc.url = url
        self.navigationController?.pushViewController(vc, animated: true)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

}

